package qlsl.androiddesign.fragment.subfragment;

import com.qlsl.androiddesign.demo.R;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import qlsl.androiddesign.fragment.commonfragment.TabFragment;
import qlsl.androiddesign.view.baseview.FunctionView;
import qlsl.androiddesign.view.subview.fragmentview.SearchUserView;

public class SearchUserFragment extends TabFragment {

	private SearchUserView functionView;

	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		if (functionView == null) {
			ViewGroup contentView = (ViewGroup) inflater.inflate(R.layout.fragment_search_user, null);
			functionView = new SearchUserView(this, onCreateView(inflater), contentView);
		}
		ViewGroup parent = (ViewGroup) functionView.view.getParent();
		if (parent != null) {
			parent.removeView(functionView.view);
		}
		return functionView.view;
	}

	public FunctionView<?> getFunctionView() {
		return functionView;
	}

	public void onTabResume() {

	}

	public void onTabPause() {

	}

	public void onNetWorkSucceed(String method, Object values) {
		if (method.equals("search")) {
			functionView.showData(values);
		}
	}

}
